<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>选择学生</title>
  <meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="../static/css/amazeui.min.css" />
  <link rel="stylesheet" href="../static/css/toastr.css">
  <link rel="stylesheet" href="../static/css/admin.css">
  <link rel="stylesheet" href="../static/css/app.css">
</head>
<body data-type="selectStudent" >
<div  class="tpl-portlet-components" >
    <div class="tpl-block">
      <div class="am-g">
        <div class="am-u-sm-12 am-u-md-3 auth-show" auth-data="admin">
          <div class="am-form-group">
            <select class="select-option major-select-data" select-id="majorId"  data-am-selected="{btnSize: 'sm'}">

            </select>
          </div>
        </div>
        <div id="search-div" class="am-u-sm-12 am-u-md-9">
          <div class="am-input-group am-input-group-sm">
            <input type="text" id="search-input" placeholder="输入学号查询" class="am-form-field">
            <span class="am-input-group-btn">
                <button id="search-submit" class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="button"></button>
            </span>
          </div>
        </div>
      </div>
      <div class="am-g">
        <div class="am-u-sm-12">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>专业</th>
                <th>班级</th>
                <th>操作</th>
              </tr>
            </thead>
            <div id="data-list-input">
              <input type="hidden" class="data-list-input" name="majorId" value="" />
              <input type="hidden" class="data-list-input" name="subjectId" value="" />
            </div>
            <tbody id="data-list">
            </tbody>
          </table>
          <div class="am-cf">

            <div class="am-fr">
              <ul class="am-pagination tpl-pagination" id="data-list-page">

              </ul>
            </div>
          </div>
          <hr>
        </div>
      </div>
    </div>
    <div class="tpl-alert"></div>
  </div>
  <script id="selectStudentdataListTpl" type="text/html">
    <% for(var i=0;i<$data.length;i++){ %>
      <% if(i%2==0){%>
    <tr list-data-id="<%==$data[i].id%>">
      <td><%==$data[i].username%></td>
      <td><%==$data[i].nickname%></td>
      <td><%==$data[i].majorName%></td>
      <td><%==$data[i].sclass%></td>
      <td>
        <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
            <button  onclick="selectTa()"  class="selectTa am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span>选择TA</button>
          </div>
        </div>
      </td>
    </tr>
    <%}else if(i%2==1){%>
    <tr list-data-id="<%==$data[i].id%>">
      <td><%==$data[i].username%></td>
      <td><%==$data[i].nickname%></td>
      <td><%==$data[i].majorName%></td>
      <td><%==$data[i].sclass%></td>
      <td>
        <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
            <button onclick="selectTa('<%==$data[i].username%>')"  class="selectTa am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span>选择TA</button>
        </div>
        </div>
      </td>
    </tr>
    <%}}%>
  </script>
  <script id="studentdataTpl" type="text/html">
    <tr list-data-id="<%==$data.id%>">
      <td><%==$data.username%></td>
      <td><%==$data.nickname%></td>
      <td><%==$data.majorName%></td>
      <td><%==$data.sclass%></td>
      <td>
        <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
            <button  onclick="selectTa('<%==$data.username%>')" <%if($data.selectSuccess==1) print('disabled')%> class="am-btn am-btn-default am-btn-xs am-hide-sm-only">
              <span class="am-icon-copy"></span>
              <%if($data.selectSuccess==1){ print('该学生已选题') }else{ print('选择TA') }%>
            </button>
          </div>
        </div>
      </td>
    </tr>
  </script>
  <script src="../static/js/jquery.min.js"></script>
  <script src="../static/js/amazeui.min.js"></script>
  <script src="../static/js/toastr.min.js"></script>
  <script src="../static/js/layer/layer.js"></script>
  <script src="../static/js/ajaxfileupload.js"></script>
  <script src="../static/js/template-web.js"></script>
  <script src="../static/js/tools.js"></script>
  <script src="../static/js/app.js"></script>
</body>
</html>
